package com.example.basic.web.service.admire.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.basic.web.mapper.admire.AdmireMapper;
import com.example.basic.web.model.admire.Admire;
import com.example.basic.web.service.admire.IAdmireService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdmireServiceImpl extends ServiceImpl<AdmireMapper, Admire> implements IAdmireService {

    @Autowired
    private AdmireMapper admireMapper;

    @Override
    public List<Admire> queryList() {
        LambdaQueryWrapper<Admire> admireLambdaQueryWrapper=new LambdaQueryWrapper<>();
        admireLambdaQueryWrapper.orderByDesc(Admire::getType);
        return admireMapper.selectList(admireLambdaQueryWrapper);
    }
}
